//
//  ZLButtonTableViewCell.m
//  TripTogether
//
//  Created by dllo on 15/12/30.
//  Copyright © 2015年 王军岐. All rights reserved.
//

#import "ZLButtonTableViewCell.h"

@implementation ZLButtonTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor = [UIColor colorWithRed:0.98 green:0.97 blue:0.93 alpha:1];
        self.btn = [UIButton buttonWithType:(UIButtonTypeCustom)];
        self.btn.backgroundColor = [UIColor colorWithRed:0.98 green:0.97 blue:0.93 alpha:1];
        [self.btn setTitle:@"全部印象" forState:(UIControlStateNormal)];
        [self.btn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
        [self.contentView addSubview:self.btn];
        [self.btn addTarget:self action:@selector(btnAction:) forControlEvents:(UIControlEventTouchUpInside)];
        [self.btn mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.left.equalTo(self.contentView.mas_left).offset(80);
            make.right.equalTo(self.mas_right).offset(-80);
            make.top.equalTo(self.mas_top).offset(20);
            make.height.equalTo(@60);

        }];
        self.btn.layer.borderWidth = 1;
        self.btn.layer.cornerRadius = 30;
        self.btn.layer.masksToBounds = YES;
        
        
        self.myImageV = [UIImageView new];
        self.myImageV.image = [UIImage imageNamed:@"01C7406A-2BBD-4611-B6B6-FD95DCD4939E.png"];
        [self.contentView addSubview:self.myImageV];
        [self.myImageV mas_makeConstraints:^(MASConstraintMaker *make) {
            
            make.left.right.equalTo(self.contentView);
            make.top.equalTo(self.btn.mas_bottom).offset(20);
            make.height.equalTo(@40);
        }];
    }
    return self;
}

- (void)btnAction:(UIButton *)btn
{
    [self.buttonTableViewCellDelegate toMoreImpress];
}





- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
